import datetime

from applications.extensions import db


class Robot_Info(db.Model):
    __tablename__ = 't_robot_info'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='robotID')
    name = db.Column(db.String(20), comment='机器人名称')
    code = db.Column(db.String(20), comment='机器人标识')
    avatar = db.Column(db.String(255), comment='头像', default="/static/admin/admin/images/avatar.jpg")
    remark = db.Column(db.String(255), comment='备注')
    type = db.Column(db.String(20), comment='类型')
    capacity = db.Column(db.Integer, comment='负载量')
    enable = db.Column(db.Integer, default=0, comment='启用')
    create_at = db.Column(db.DateTime, default=datetime.datetime.now, comment='创建时间')
    update_at = db.Column(db.DateTime, comment='最近运行时间')

